package com.lantosec.hmrp.modules.warning.vo;

import com.lantosec.hmrp.modules.warning.entity.WarningReported;
import com.lantosec.hmrp.core.mvc.BaseVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * <p>
 * 预警上报人 VO对象
 * </p>
 *
 * @author AutoCode
 * @since 2020-07-16
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value="WarningReported对象", description="预警上报人")
public class WarningReportedVO extends BaseVO<WarningReported> {
    private static final long serialVersionUID = 1L;


    public WarningReportedVO(WarningReported entity){
        this.waningReportedId = entity.getWaningReportedId();
        this.ruleId = entity.getRuleId();
        this.notifierMode = entity.getNotifierMode();
        this.notifierDeptId = entity.getNotifierDeptId();
        this.notifierPositionId = entity.getNotifierPositionId();
        this.notifierUserId = entity.getNotifierUserId();
        this.notifierRoleId = entity.getNotifierRoleId();
    }

    @Override
    public WarningReported convertToEntity(){
        return new WarningReported(this);
    }


    @ApiModelProperty(value = "主键ID")
    private Integer waningReportedId;

    @ApiModelProperty(value = "预警规则ID")
    private String ruleId;

    @ApiModelProperty(value = "预警上报人模式(1部门 2岗位 3人员 4角色)")
    private Integer notifierMode;

    @ApiModelProperty(value = "预警上报人部门ID")
    private String notifierDeptId;

    @ApiModelProperty(value = "预警上报人岗位ID")
    private String notifierPositionId;

    @ApiModelProperty(value = "预警上报人ID")
    private String notifierUserId;

    @ApiModelProperty(value = "预警上报人角色ID")
    private String notifierRoleId;


}
